package org.fly.utils;

import org.fly.bean.CustomerLevel;
import org.fly.bean.SCLR;

import java.util.Map;

/**
 * Created by rongzhao.zhu on 2018/4/10.
 */
public class CustomerLevelUtils {

    public static String getCustomerLevel(String customerId,String supplierId,
                                    Map<String,CustomerLevel> customerLevelMap
            ,Map<String,SCLR> sclrMap){
        String customerLevel = "";
        CustomerLevel defaultLevel =  customerLevelMap.get(supplierId);
        if(defaultLevel !=null){
            customerLevel = defaultLevel.getId();
            SCLR sclr = sclrMap.get(supplierId);
            if(sclr !=null ){
                customerLevel = sclr.getCustomerLevelId();
            }
        }
        return customerLevel;
    }
}
